﻿/*------------------------------------------------
// File Description: ReworkItem DataBase Entity
// Author:			 Crane
// Create Time:		 2020-06-22 09:17:51
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using IOA.MES.DataAccess.Enum;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 返修对象
    /// </summary>
    [Table(nameof(ReworkItem))]
    public class ReworkItem : BaseEntity
    {
        private string _reworkNo = string.Empty;
        private string _reworkItemNo = string.Empty;

        #region Public Property

        ///<Summary>
        /// 返修单号
        ///</Summary>
        public string ReworkNo
        {
            get { return string.IsNullOrWhiteSpace(_reworkNo) ? string.Empty : _reworkNo; }
            set { _reworkNo = value; }
        }

        ///<Summary>
        /// 返修对象号
        ///</Summary>
        public string ReworkItemNo
        {
            get { return string.IsNullOrWhiteSpace(_reworkItemNo) ? string.Empty : _reworkItemNo; }
            set { _reworkItemNo = value; }
        }

        /// <summary>
        /// 生产状态
        /// </summary>
        public ProduceStatus ProduceStatus { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 返修对象
        /// </summary>
        public virtual DbSet<ReworkItem> ReworkItems { get; set; }
    }
}